#include<stdio.h>
#include<time.h>
#include<iostream>
using namespace std;

int main()
{
	long i = 10000000L;
	clock_t start, finish;
	double duration;
	start = clock();

	while (i--);
	finish = clock();
	cout << start << "\t" << finish << "\t" << CLOCKS_PER_SEC << endl;
	duration = (double)(finish - start) / CLOCKS_PER_SEC;
	printf( "%f seconds\n", duration );


	time_t lt;
	lt =time(NULL);

	printf("The Calendar Time now is %ld\n",lt);
	
	tm *local;
	time_t t;
	t=time(NULL);
	local=localtime(&t);
	printf("Local hour is: %d\n",local->tm_hour);
	local=gmtime(&t);
	printf("UTC hour is: %d\n",local->tm_hour);


	time_t t_of_day;
	t_of_day=mktime(local);
	printf(ctime(&t_of_day));
	return 0;
}